<?php

namespace App\Model;

use App\Tools\Random;
use Illuminate\Database\Eloquent\Model;

class Admin extends Model
{
    //
    protected $table = 'admins';
    protected $primaryKey = 'admin_id';
    public $timestamps = false;

    public static function adminRegister()
    {
        $admin = new Admin();

        $admin->admin_id = Admin::createAdminId();
        dd($admin->admin_id);
    }

    private static function createAdminId()
    {
        return time() . Random::randomNumber(6);
    }
}
